add jar hdfs:///StarRocks/jars/starrocks-spark2_2.11-1.0.0.jar;
CREATE TEMPORARY VIEW  apps_usage_log_dt
USING starrocks
OPTIONS
(
    "starrocks.table.identifier" = "db_ops.apps_usage_log",
    "starrocks.fenodes" = "10.33.134.11:8030",
    "user" = "root",
    "password" = "fF0&cD2@bS0#",
    "starrocks.batch.size" = "10000",
    "starrocks.exec.mem.limit" = "61474836480",
    "starrocks.request.tablet.size" = "6",
    "starrocks.filter.query" = "substr(dt,1,10)='{{ execution_date | date_add(1) | cst_ds }}'",
    "starrocks.request.read.timeout.ms" = "300000"
);
insert overwrite table jms_ods.apps_usage_log partition (dt)
select
dt as grad_time
,app_id
,user
,name
,queue
,type
,Vcores
,mem_MB
,usage
,state
,startedTime
,finishedTime
,substr(dt,1,10) as dt
from apps_usage_log_dt
distribute by dt,pmod(hash(rand()),50);